#include "DXUT.h"
#include "CubeTexture.h"


 

CCubeTexture::CCubeTexture( const TCHAR * resName,const TCHAR * szFilePath, D3DPOOL pool /*= D3DPOOL_DEFAULT*/ )
:CGraphicsFileResource(RESOURCE_TYPE_CUBETXTURE,resName,szFilePath,pool)
 
{
	m_pD3DCubeTexture=NULL;
}


CCubeTexture::~CCubeTexture(void)
{
}

HRESULT CCubeTexture::OnD3D9ResetDevice( IDirect3DDevice9* pd3dDevice )
{
	   HRESULT hr;
	   V_RETURN(D3DXCreateCubeTextureFromFile(pd3dDevice,this->GetFileName(),&m_pD3DCubeTexture));
	   return hr;
	 
}

void CCubeTexture::OnD3D9LostDevice()
{

SAFE_RELEASE(m_pD3DCubeTexture);

}
